
if 'options' not in globals():
    from optparse import OptionParser
    parser = OptionParser()
    parser.add_option('', "--fs", action="store_true", dest="fullscreen",
        default=False, help="Run fullscreen")
    parser.add_option('', "--win", action="store", dest="win_size",
        metavar='W,H',
        default='1024,768', help="Run windowed with dimensions w,h")
    parser.add_option('', "--nomusic", action="store_true", dest="nomusic",
        default=False, help="Don't play the music")
    parser.add_option('', "--god", action="store_true", dest="god",
        default=False, help="DEBUG: Run in god mode (add Zot, show FPS)")
    parser.add_option('', "--play", action="store", dest="play", default='',
        metavar='FILENAME',
        help="DEBUG: Skip straight to play level (eg. level-dungeon-1.xml)")
    parser.add_option('', "--inventory", action="store_true", dest="inventory",
        default=False, help="DEBUG: Skip straight to party inventory screen")
    parser.add_option('', "--shopping", action="store_true", dest="shopping",
        default=False, help="DEBUG: Skip straight to shopping screen")
    parser.add_option('', "--grant-xp", action="store", dest="grant_xp",
        metavar='N', default='',
        help="DEBUG: Grant the party characters N XP each.")
    parser.add_option('', "--grant-coin", action="store", dest="grant_coin",
        metavar='N', default='', help="DEBUG: Grant the party N coin.")
    options, args = parser.parse_args()

